import { defineComponent, reactive, onMounted } from 'vue'
import { ElSkeleton } from 'element-plus'

// 默认占位组建
export default defineComponent(function PageLoading () {
  const state = reactive<{ loading: boolean }>({ loading: true })

  onMounted(() => { state.loading = false })

  return () => state.loading
    ? (
        <ElSkeleton animated rows={5} />
      )
    : (
        <router-view></router-view>
      )
})
